<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreatePointPositionTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('point_position', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('点位名称');
            $table->unsignedBigInteger('category_id')->default(0)->comment('分类id');
            $table->unsignedInteger('province_id')->default(0)->comment('省份id');
            $table->unsignedInteger('city_id')->default(0)->comment('城市id');
            $table->unsignedInteger('district_id')->default(0)->comment('区县id');
            $table->string('description')->nullable()->comment('点位考察要求');
            $table->string('lng',60)->nullable()->comment('地图经度');
            $table->string('lat',60)->nullable()->comment('地图纬度');
            $table->unsignedBigInteger('admin_id',false)->default(0)->comment('创建者id');
            $table->timestamps();
            $table->softDeletes();
            $table->engine="InnoDb";
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('point_position');
    }
}
